<?xml version='1.0' encoding='UTF-8' ?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/templates/template.xhtml">

    <ui:define name="title"><h:outputText value="Exam Session" /></ui:define>
    <ui:define name="header"><h:outputText value="Exam Session" /></ui:define>
    <ui:define name="menu">      
    <p:breadCrumb >
        <p:menuitem value="Home" url="#" />
        <p:menuitem value="Exam List" url="/faces/examsession/examList.xhtml" />
    </p:breadCrumb>
   </ui:define>
    <ui:define name="content">
        <br/><br/>
        <h:form id="examListForm">
            
            <p:dataTable id="examlisttable" var="examsession" value="#{examListView.examSessionList}">
                <f:facet name="header">
                    Exam List
                </f:facet>
                <p:column headerText="Exam Paper">
                    <h:link outcome="/faces/examsession/examsession.xhtml" value="#{examsession.examPaperId.name}">
                           <f:param name="examSessionId" value="#{examsession.id}"/>
                    </h:link>
                </p:column>
                <p:column headerText="Module">
                    <h:outputText value="#{examsession.examPaperId.moduleId.name}" />
                </p:column>
                <p:column headerText="Exam Start Time">
                    <h:outputText value="#{examsession.dateTime}" />
                </p:column>
                <p:column headerText="Exam Duration">
                    <h:outputText value="#{examsession.duration} minutes" />
                </p:column>
            </p:dataTable>
            
        </h:form>  
        
    </ui:define>

</ui:composition>

